package cn.sju.tq.controller;

import cn.sju.tq.pojo.Order;
import cn.sju.tq.service.impl.OrderServiceImpl;

public class OrderController {

    private OrderServiceImpl orderServiceImpl;

    public OrderServiceImpl getOrderServiceImpl() {
        return orderServiceImpl;
    }

    public void setOrderServiceImpl(OrderServiceImpl orderServiceImpl) {
        this.orderServiceImpl = orderServiceImpl;
    }

    public void payOrder(Order order){
        System.out.println("用户把需要购买的商品添加到购物车，并点击下单按钮了");
        orderServiceImpl.addOrder(order);
        System.out.println("恭喜你["+order.getUser().getName()+"]下单成功，请等待收货！");
    }
}
